Skip to content

Scale Cloud Whisper timeout for long recordings#646

Merged
H-Chris233 merged 2 commits into
Open-Less:betafrom
katanumahotori:codex/whisper-dynamic-timeout-upstream
Jun 12, 2026
Merged

Scale Cloud Whisper timeout for long recordings#646
H-Chris233 merged 2 commits into
Open-Less:betafrom
katanumahotori:codex/whisper-dynamic-timeout-upstream

Conversation

@katanumahotori

@katanumahotori katanumahotori commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

User description

Summary

  • replace the fixed 15s coordinator timeout for Cloud Whisper-compatible dictation with an audio-duration-aware timeout
  • apply the same timeout to the existing history retranscription path using the archived PCM duration
  • add timeout boundary tests for short, zero-length, long, capped, and exact-cap recordings

Why

Long Cloud Whisper-compatible recordings can take longer than the existing 15s coordinator guard to transcribe. In that case the recording is marked as a timeout even though the provider may still be working. This is especially visible for multi-minute recordings.

The new timeout is:

  • floor: 30s
  • scaled: ceil(audio_secs * 0.5) + 15
  • cap: 300s

For example, a 422s recording now gets a 226s timeout instead of 15s.

The same timeout is also used when retranscribing an archived recording, where the exact PCM duration is available.

Validation

  • cargo test cloud_whisper_timeout --lib passed: 5 tests
  • cargo test passed: 521 tests
  • cargo build --release passed
  • Claude review: no blockers, ready for PR
  • Codex review: no blockers, ready for PR

Note: cargo fmt --check currently reports unrelated existing formatting diffs in upstream files outside this PR, so I did not apply broad formatting changes.


PR Type

Enhancement, Bug fix


Description

  • Replace fixed 15s coordinator timeout with audio-duration-aware timeout for Cloud Whisper

  • Apply same timeout to retranscription path and add Apple Speech retranscription support

  • Add boundary tests for short, zero, long, capped, and exact-cap recordings


Diagram Walkthrough

flowchart LR
  AudioLength["Audio length (seconds)"]
  ComputeTime["Compute timeout: ceil(len*0.5)+15, clamped [30,300]"]
  Transcribe["Cloud Whisper transcribe with timeout"]
  Retranscribe["Retranscribe archived PCM with same timeout"]
  AudioLength --> ComputeTime
  ComputeTime --> Transcribe
  ComputeTime --> Retranscribe
Loading

File Walkthrough

Relevant files
Enhancement
coordinator.rs
Use dynamic timeout in retranscribe_pcm and add Apple Speech

openless-all/app/src-tauri/src/coordinator.rs

  • Added import of pcm module to compute audio duration
  • Modified retranscribe_pcm to use cloud_whisper_transcribe_timeout for
    Whisper provider
  • Added Apple Speech retranscription timeout using
    local_qwen_transcribe_timeout
+18/-6   
asr_setup.rs
Add timeout constants and scaling function for Cloud Whisper

openless-all/app/src-tauri/src/coordinator/asr_setup.rs

  • Defined CLOUD_WHISPER_MIN_TIMEOUT_SECS (30) and
    CLOUD_WHISPER_MAX_TIMEOUT_SECS (300)
  • Implemented cloud_whisper_transcribe_timeout function with formula
    ceil(audio_secs * 0.5) + 15, clamped between min and max
+13/-0   
Bug fix
dictation_end.rs
Use audio-aware timeout in Cloud Whisper end_session         

openless-all/app/src-tauri/src/coordinator/dictation_end.rs

  • Replaced fixed COORDINATOR_GLOBAL_TIMEOUT_SECS with dynamic
    cloud_whisper_transcribe_timeout in end_session for Whisper provider
  • Added logging of audio duration and computed timeout
+8/-3     
Tests
tests.rs
Add unit tests for cloud_whisper_transcribe_timeout           

openless-all/app/src-tauri/src/coordinator/tests.rs

  • Added 5 test cases: floor for short recordings, zero duration, scaling
    for 422s, cap at 1000s, exact cap boundary at 570s
+42/-0   

Co-Authored-By: Codex <codex@openai.com>
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit c7a65b9)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@katanumahotori

Copy link
Copy Markdown
Contributor Author

Clarification: this PR is not intended to implement the full history recording/retranscription feature request. That functionality is already present on beta. This PR only fixes the remaining fixed 15s Cloud Whisper timeout in normal dictation and in the existing retranscription path.

Co-Authored-By: Codex <codex@openai.com>
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit c7a65b9

@H-Chris233 H-Chris233 merged commit 8b7dd83 into Open-Less:beta Jun 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants